<script setup lang="ts">
import {defineProps} from 'vue'
interface TreeData {
  key: string
  title: string
  children: TreeData[]
}
const props = defineProps<{
  data: TreeData[]
  }>()
</script>

<template>
  <div v-for="item in props.data" :key="item.key">
    <div>{{ item.title }}</div>
    <TreeComponent :data="item.children"/>
  </div>
</template>
